package com.example.administrator.baikangxing.utils;

import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by Sushil_Shen on 2017/4/15/0015.
 * Contact: Sushil_shen@163.com
 */

public class ProgressDialogUtils {

    public static ProgressDialog createProgressDialog(Context context, String content) {
        // 创建进度对话框
        ProgressDialog dialog = new ProgressDialog(context);
        dialog.setMessage(content);
        dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        dialog.setCancelable(true); //设置进度条是否可以按退回键取消
        dialog.setCanceledOnTouchOutside(false);  //设置点击进度对话框外的区域对话框不消失
        return dialog;
    }
}
